from django.db import models

class Area(models.Model):
    name = models.CharField(verbose_name="区域名",max_length=20)
    parent = models.ForeignKey('self',null=True,on_delete=models.SET_NULL,related_name="subs")

    class Meta:
        db_table = "tb_areas"
        verbose_name = "区域名字"
        verbose_name_plural = verbose_name


    def __str__(self):
        return self.name